package com.yupi.springbootinit.mapper;

import com.yupi.springbootinit.model.entity.Chart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Entity com.yupi.springbootinit.model.entity.Chart
 */
public interface ChartMapper extends BaseMapper<Chart> {

    List<Map<String, Object>> queryChartData(String querySql);

    /**
     * 为指定图表创建数据表并存储数据
     * @param chartId 图表ID
     * @param csvData CSV格式的数据
     */
    void createDataTableForChart(@Param("chartId") Long chartId, @Param("csvData") String csvData);


    void executeInsertQuery(String insertSql);


}




